import { getRandomDateTime, getNowDate, getFeatureDate } from '../../../utils'
import Mock from 'mockjs'
export const cronJobListMock = pageSize => {
  const result: any[] = []
  for (let i = 0; i < pageSize; i++) {
    result.push({
      id: i + 1,
      name: Mock.mock('@ctitle'),
      status: Mock.mock('@natural(1, 2)'),
      handlerName: Mock.mock('@ctitle'),
      handlerParam: Mock.Random.word(5, 12),
      cronExpression: '0 0 * * * ?',
      retryCount: Mock.mock('@natural(0, 20)'),
      retryInterval: Mock.mock('@natural(0, 100)'),
      monitorTimeout: Mock.mock('@natural(0, 100)'),
      remark: Mock.mock('@csentence()'),
      creator: '1',
      create_time: getRandomDateTime(getFeatureDate(-10), getNowDate()),
      updater: '',
      update_time: '',
      deleted: false,
      deleted_time: ''
    })
  }
  return result
}
